<?php

namespace app\common\validate\Post;

//引入底层的验证器类
use think\Validate;

/**
 * 帖子验证器
 */
class Collect extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'userid' => 'require|number',
        'postid' => 'require|number',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'userid.require' => '收藏id必填',
        'postid.require' => '帖子id必填',
    ];
    
    /**
     * 验证场景
     */
    protected $scene = [
		'collection' => ['userid','postid']
    ];
}